
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;

namespace CRM.Models
{
       [Table("TradeData")]
       [Comment("贸易伙伴")]
     public class TradeData:BaseModel
    {
        
        /// <summary>
        /// 
        /// </summary>
        public int Id { get; set; }
        
        /// <summary>
        /// 商品编码
        /// </summary>
        public string CommodityId { get; set; }
        
        /// <summary>
        /// 贸易伙伴编码
        /// </summary>
        public int TradepartnerId { get; set; }
        
        /// <summary>
        /// 贸易方式编码
        /// </summary>
        public int TrademodeId { get; set; }
        
        /// <summary>
        /// 注册地编码
        /// </summary>
        public int ProvinceId { get; set; }
        
        /// <summary>
        /// 第一数量
        /// </summary>
        public long Firstquantity { get; set; }
        
        /// <summary>
        /// 第二数量
        /// </summary>
        public long Secondquantity { get; set; }
        
        /// <summary>
        /// 总金额（人民币）
        /// </summary>
        public string? Amountrmb { get; set; }
        
        /// <summary>
        /// 总金额（美金）
        /// </summary>
        public string? Amountdoller { get; set; }
        
        /// <summary>
        /// 年月
        /// </summary>
        public string? Yearmonth { get; set; }
        
        /// <summary>
        /// 数据来源
        /// </summary>
         [DefaultValue(1)]
        public int Datasources { get; set; }
        
        /// <summary>
        /// 港口
        /// </summary>
        public string Port { get; set; } 
        
        /// <summary>
        /// 单价
        /// </summary>
        public float? Unitprice { get; set; }
        
        /// <summary>
        /// 海关编码
        /// </summary>
        public string Hscode { get; set; }
        
        /// <summary>
        /// 海关关别（海关机构）
        /// </summary>
        public string Customhouse { get; set; }
        
        /// <summary>
        /// 海关关别码
        /// </summary>
        public string Customhouseid { get; set; }
        
        /// <summary>
        /// 交易时间
        /// </summary>
        public DateTime? Tradingtime { get; set; }
        
        /// <summary>
        /// 新增时间
        /// </summary>
        public DateTime? Addtime { get; set; }=DateTime.Now;
        
        /// <summary>
        /// 运输方式
        /// </summary>
        public string Transport { get; set; }
        
        //导航属性
        public  Commodity Commodity { get; set; }

        public  Province Province { get; set; }

        public  TradeMode TradeMode { get; set; }

        public  TradePartner TradePartner { get; set; }

    }
}